#ifndef __PVMOSDEP_H__
#define __PVMOSDEP_H__

#include "pvm/pvmdefs.h"
#include "pvm/pvmtypes.h"

#include <windows.h>
#include <memory.h>

#ifdef PVM_USE_MMGR
//#include "mmgr.h"
#endif

#if defined(_DEBUG) && defined(DEBUG_CRITICAL_SECTIONS)
struct PVM_CRITICAL_SECTION
{
	CRITICAL_SECTION section;
	char lastLockFile[MAX_PATH];
	int lastLockLine;
};

typedef PVM_CRITICAL_SECTION PVMCriticalSection;
#else
typedef CRITICAL_SECTION PVMCriticalSection;
#endif


typedef HANDLE PVMThreadHandle;
typedef DWORD PVMThreadRetVal;
typedef PVMThreadRetVal (PVMCALL *PVMThreadStartRoutine)(void* param);
typedef HANDLE PVMFileHandle;
typedef HANDLE PVMEventHandle;

#define PVM_FILE_OPEN_ERROR		INVALID_HANDLE_VALUE 
#define PVM_EMPTY_FILE_HANDLE	NULL

#endif